<extend name="Layout:layout_content" />
<block name="body_main"> 
    <ul class="xsui-breadcrumb">
        <li><a href="{:U('document_list')}"><i  class="fa fa-home fa-fw"></i>知识库管理</a></li>
        <li class="current">{$meta_title}</li>
    </ul>
    <h3 class="htitle">{$meta_title}</h3>
    <form action="{:U('document_edit_save')}" method="post" class="xsui-form" enctype="multipart/form-data" style="min-width:800px;">
        <fieldset>
            <div class="xsui-form-field">
                <label>标题：</label>
                <input type="text" name="title" placeholder="标题" value="{$data.title}" title="{$data.title}" size="80" required="required" />
            </div>
            <div class="xsui-form-field">
                <label>类别：</label>
                <select name="category_id" data-url="{:U('KnowledgeCategory/get_category_tree_json')}" data-value="{$data.category_id}"></select>
            </div>
            <div class="xsui-form-field-vertical">
                <label>正文内容：</label>
                <textarea name="content" class="xsui-editor" cols="90" rows="6" style="width:99%">{$data.content}</textarea>
            </div>
            <div class="xsui-form-field">
                <label>标签：</label>
                <input type="text" name="content_tags" placeholder="内容的关键词,便于以后搜索,多个词语之间用英文逗号隔开" value="{$data.content_tags}" title="{$data.content_tags}" size="80" />
            </div>
        </fieldset>
        <button type="submit" class="ui-state-default"><i class="fa fa-save"></i>保存</button>
        <button type="reset" class="ui-state-default">重置</button>
        <input type="hidden" name="id" value="{$data.id}"/>
        <input type="hidden" name="site_id" value="{$data.site_id}"/>
        <input type="hidden" name="user_name" value="{$data.user_name}"/>
    </form>
</block>
<block name="body_after">
    <script type="text/javascript">
        $(function () {
            ajax_combobox({selector: 'select[name="category_id"]', def_option: '请选择类别'});
        })
    </script>
</block>